package br.com.sgi.dao.impl;



import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import br.com.sgi.dao.AgendaDao;
import br.com.sgi.model.Agenda;
import br.com.sgi.service.AgendaService;

@Service("agedaService")
public class AgendaServiceImpl implements AgendaService {

	@Autowired
	private AgendaDao agendaDao;
	
	
	public void salvar(Agenda agenda) {
		agendaDao.save(agenda);		
	}

	public List<Agenda> buscarAgendasPorMesAno(String date) {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("data", date);		
		return agendaDao.findByNamedParams("busca_agenda_mes_ano", params);
	}

	public void update(Agenda agenda) {
		agendaDao.update(agenda);
	}
	
	

}
